package 力扣.动态规划;

public class 下载插件 {
    public static void main(String[] args) {
        System.out.println(leastMinutes(4));
    }
    public static int leastMinutes(int n) {
        int time=0;
        int width=1;
        while (n-width>=width){
            width*=2;
            time+=1;
        }
        if (n-width>0)
            time+=1;
        return time+1;
    }
}
